<div class="search-form-inline form-inline pull-left" style="margin-right:10px;">
    <form action="{:search_url('_time_from,_time_to,_filter_time')}" method="GET" pjax-search="">
        <div class="input-daterange input-group input-group-sm">
            <input class="form-control" id="_time_from" name="_time_from" value="{:input('get._time_from')}" placeholder="开始日期" type="text">
            <span class="input-group-addon"><i class="fa fa-chevron-right"></i></span>
            <input class="form-control" id="_time_to" name="_time_to" value="{:input('get._time_to')}" placeholder="结束日期" type="text">
        </div>
        <input id="_filter_time" name="_filter_time" value="{$topSearchParam.searchTime}" type="hidden" />
        <button type="submit" class="btn btn-default btn-sm">确定</button>
    </form>
</div>
<script>
$(function(){
    var picker1 = $('#_time_from').datetimepicker({
        format: 'YYYY-MM-DD',
        locale: moment.locale('zh-cn'),
    });
    var picker2 = $('#_time_to').datetimepicker({
        format: 'YYYY-MM-DD',
        locale: moment.locale('zh-cn'),
    });
    picker1.on('dp.change', function (e) {
        picker2.data('DateTimePicker').minDate(e.date);   //结束设置最小值
    });
    picker2.on('dp.change', function (e) {
        picker1.data('DateTimePicker').maxDate(e.date);   //开始设置最大值
    });
})
</script>